package com.duan.cwgl.utils;


import com.duan.cwgl.entity.UserInfo;

import javax.servlet.http.HttpSession;

/**
 * @author 断诗
 */
public class Config {

    public static String CURRENT_USERNAME = "currentUser";

    //Result
    /**
     * 成功
     */
    public static int SUCCESS=200;

    /**
     * 失败
     */
    public static int UNSUCCESS=400;

    /**
     * 异常
     */
    public static int ERROR=500;

    /**
     * 启用自定义日志打印
     * */
    public static boolean ENABLE_CUSTOMEIZE_LOG = true;


    public static UserInfo getSessionUser(HttpSession session){
        return (UserInfo)session.getAttribute(CURRENT_USERNAME);
    }


}
